import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { BaseItem } from "../common/BaseItem";
import { STreasureInfo } from "../../../../Message/Public/STreasureInfo";
import { ItemData } from "../../resource/info/ItemData";
//class FairylandItemShowRenderer
    
    export  class FairylandItemShowRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ configUI(): void
        {
            this._item = new BaseItem();
            this._item.setSize(32, 32);
            this._item.move(2, 2);
            this._item.isDragAble = false;
            this._item.isDropAble = false;
            addChild(this._item);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._item.itemData = null;
            this._itemData = null;
            if (arg1 == null) 
            {
                return;
            }
            var loc1=arg1 as STreasureInfo;
            this._itemData = new ItemData(loc1.itemCode);
            this._item.itemData = this._itemData;
            this._item.amount = loc1.amount;
            this._item.drawNow();
            return;
        }

        /* internal */ /* var */_item: BaseItem;

        /* internal */ /* var */_itemData: ItemData;
    }
